﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Medianamik.Client.MVP.View;
using StructureMap;

namespace Medianamik.Client.MVP.Presentation
{
    public abstract class PresenterWithRepository<TView, TRepository> : Presenter<TView>
        where TRepository : class
        where TView : IView
    {
        protected readonly TRepository Repository;

        protected PresenterWithRepository(TView view, TRepository repository)
            : base(view)
        {
            Repository = repository ??
                ObjectFactory.GetInstance<TRepository>();
        }
    }
}
